package com.trkj.dao.cf;

import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojo.Coursearrangement;
import com.trkj.pojo.StaffInformation;
import com.trkj.vo.cf.CoursearrangementVo;

public interface CoursearrangementDAO extends CrudRepository<Coursearrangement, Long> {
		@Query("select q,s,t from Coursearrangement q inner join q.staffInformation s inner join q.traininggactivity t")
		public List<Object[]> coursearrangementQuery(Pageable pageRequest);
		@Query("select q,s from StaffInformation q inner join q.coursearrangements s where q.stainName like ?1")
		public List<Object[]> queryByName(String stainName);
		@Query("select s,l from StaffInformation s inner join s.laborTurnovers l where l.voluntaryTurnover=0")
		public List<Object[]> findAll2();
}
